package com.jzw.service.impl;

import com.jzw.pojo.Users;
import com.jzw.service.TestUsersTransactionalService;
import com.jzw.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.UUID;

@Service
public class TestUsersTransactionaServiceImpl implements TestUsersTransactionalService {
    @Autowired
    UserService userService;

    @Override
//    @Transactional(propagation = Propagation.REQUIRED)
    public void testTransitional() {
//        userService.saveParent();
        userService.saveChildren();
//        saveChildren1();
//        System.out.println();
//        if (true){
//            throw new RuntimeException();
//        }
//        saveChildren2();
    }
}
